home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Special 25 / AMIGAplus Sonderheft 25 (2000)(Falke)(DE)(Track 1 of 4)[!].iso / Rexx / AnimPath.pprx < prev    next >
Text File  |  2000-05-08  |  60KB  |  1,986 lines

  1. /* Personal Paint Amiga Rexx script - Copyright © 1997 Cloanto Italia srl */
  2.  
  3. /* $VER: AnimPath.pprx 1.3 */
  4.  
  5. /** ENG
  6.  This script can be used to easily create animations with
  7.  moving and transforming objects.
  8.  
  9.  The main requester gives access to the following commands:
  10.  
  11.  - New: the path is cleared and the brush transformations are set
  12.    to their defaults.
  13.  
  14.  - Load: an existing path file can be selected using the file requester;
  15.    this causes the path coordinates, the brush transformation settings
  16.    and the animation settings to be loaded (note: this data
  17.    is stored in ASCII format and can easily be algorithmically
  18.    generated and manipulated by other programs).
  19.  
  20.  - Save: this command writes a path file using the current path data.
  21.  
  22.  - Define Freehand: the mouse can be used to "draw" the path;
  23.    both the direction of the path and the mouse movement speed
  24.    affect the resulting animation: the original direction
  25.    is used to render the frames (the starting point is used
  26.    to place the object in the first frame and the last point
  27.    is used for the last frame) and the drawing speed
  28.    affects the number and the "density" of stored points
  29.    (the slower the speed, the more points, and
  30.    vice versa) and defines the perceived speed of the animation
  31.    (e.g. a path defined with a high initial speed and a slow
  32.    ending speed leads to a corresponding animation).
  33.    Before the mouse button is pressed, the brush is displayed to ease
  34.    positioning in the first frame. All drawing must occur holding
  35.    down the left mouse button, releasing it only at the end
  36.    of the definition.
  37.  
  38.  - Define Linear: the mouse can be used to define a linear path
  39.    (simply consisting of a starting point and an ending point);
  40.    unlike the freehand path, this kind of path produces a
  41.    constant-speed animation (equally-spaced intermediate points
  42.    are generated automatically). To define the path, press the left
  43.    mouse button on the starting point, and release it at the end.
  44.  
  45.  - Edit: this command can be used to visually edit the path;
  46.    the "path points" can be dragged with the mouse to change the
  47.    path shape and/or density (speed); the <m> key toggles
  48.    the magnify mode on or off, and the right mouse button or the <Esc> key
  49.    can be pressed to leave the editing mode.
  50.  
  51.  - Move and Resize: the mouse can be used to resize the animation
  52.    path (clicking on the lower right part of the path) or to drag it
  53.    to a new position (clicking on the upper part). This is useful
  54.    to create paths with point outside the screen, which cannot be
  55.    drawn by hand. The <m> key toggles the magnify mode on or off, and
  56.    the right mouse button or the <Esc> key can be pressed
  57.    to exit from the move and resize mode.
  58.  
  59.  - Brush Angle: the Brush Angle requester is used to set
  60.    the number of brush rotations ("Rotation Cycles"), the starting
  61.    ("From Angle") and ending angle ("To Angle"), and the
  62.    rotation direction ("Direction": "Clockwise/Counterclockwise");
  63.    a number of rotations greater than 1 can be used to add
  64.    additional 360° spins in the specified direction.
  65.  
  66.  - Brush Shear: the Brush Shear requester is used to set
  67.    the number of shear cycles ("Shear Cycles"), the starting and
  68.    ending horizontal shear ("From Horizontal", "To Horizontal"),
  69.    and the starting and ending vertical shear ("From Vertical",
  70.    "To Vertical"); if a number of shear cycles greather than 1 is specified,
  71.    the shear factors will move back and forth within the specified
  72.    limits (an odd number of cycles must be used to reach the ending
  73.    shear in the last frame).
  74.  
  75.  - Brush Size: the Brush Size requester is used to set
  76.    the number of resize cycles ("Resize Cycles"), the starting and
  77.    ending horizontal size ("From Horizontal", "To Horizontal",
  78.    in percentage of the original size), and the starting and ending
  79.    vertical size ("From Vertical", "To Vertical");
  80.    if a number of resize cycles greather than 1 is specified,
  81.    the resize factors will move back and forth within the specified
  82.    limits (an odd number of cycles must be used to reach the ending
  83.    size in the last frame).
  84.  
  85.  - Data: the data requester can be used to view the path data
  86.    at a glance (animation, rotation, shear and resize settings,
  87.    followed by the path coordinates).
  88.  
  89.  - Preview: this command can be used to preview the animation;
  90.    when one or more brush effects are involved, the brush image
  91.    is replaced by an outline (the inner arrow points to the top
  92.    of the brush).
  93.  
  94.  The main requester also contains gadgets to set the animation
  95.  frames ("Count"), the recording direction ("Direction":
  96.  "Forward/Backward/Still" - the frame step) and the frame insertion option
  97.  ("Add Frames" - if active, "Count" frames are inserted).
  98.  
  99.  When using freehand paths with no brush effect, the "Count"
  100.  setting should not be set to a number greater than the path points
  101.  (as reported by the Data requester), as this would generate one or more
  102.  duplicate frames.
  103.  
  104.  The bottom gadgets in the main requester can be used to render
  105.  the animation ("Draw", which also terminates the script) or to
  106.  quit the script ("Quit"). A copy of the current path is
  107.  always temporarily stored, so that it can be used when the script is
  108.  run again.
  109.  
  110.  The following program settings affect the animation appearance and
  111.  quality: the current brush (anim-brushes can be used to
  112.  create complex animation effects), the brush handle position,
  113.  the brush paint mode (and the foreground color, if the "Color" mode
  114.  is active) and the "Color average resize" option.
  115. */
  116.  
  117. /** DEU
  118.  Dieses Skript ermöglicht die einfache Erzeugung von Animationen, in deren
  119.  Verlauf Objekte bewegt und verwandelt werden.
  120.  
  121.  Im Haupt-Dialogfenster erfolgt der Zugriff auf folgende Befehle:
  122.  
  123.  - Neu: Löscht den alten Pfad und setzt die Pinseltransformationen auf die
  124.    Standardwerte zurück.
  125.  
  126.  - Laden: Mit dem Dateiauswahlfenster läßt sich eine zuvor gespeicherte
  127.    Pfaddatei auswählen. Dabei werden Pfadkoordinaten, Einstellungen für die
  128.    Pinseltransformation und verschiedene Animationseinstellungen geladen.
  129.    Hinweis: Diese Daten liegen im ASCII-Format vor und lassen sich daher auf
  130.    einfache Weise mit Hilfe anderer Programme algorithmisch erzeugen und/oder
  131.    verändern.
  132.  
  133.  - Speichern: Schreibt eine Pfaddatei unter Verwendung der aktuellen
  134.    Pfaddaten.
  135.  
  136.  - Frei festlegen: Ermöglicht die Bestimmung des Pfades mit Hilfe der Maus.
  137.    Sowohl dessen Verlauf als auch die Geschwindigkeit der Mausbewegung
  138.    beeinflussen den späteren Animationsablauf: Die ursprüngliche Richtung wird
  139.    zur Berechnung der Einzelbilder verwendet (Das erste Einzelbild wird am
  140.    Startpunkt berechnet, das letzte dementsprechend am Zielpunkt), während die
  141.    Geschwindigkeit des Zeichenvorgangs sowohl Anzahl als auch Abstand
  142.    ("Dichte") der gespeicherten Punkte beeinflußt. Dabei gilt: Je geringer die
  143.    Geschwindigkeit, desto mehr Punkte, und umgekehrt. Auch die
  144.    Ablaufgeschwindigkeit hängt von diesem Faktor ab, d. h. ein mit hoher
  145.    Anfangs- und geringer Endgeschwindigkeit definierter Pfad erzeugt eine
  146.    dementsprechend mit zunehmend geringerer Geschwindigkeit ablaufende
  147.    Animation. Um die Festlegung der Position für das erste Einzelbild zu
  148.    erleichtern, wird vor der Betätigung der linken Maustaste das aktuelle
  149.    Zeichen angezeigt.
  150.  
  151.  - Linear festlegen: Ermöglicht die Bestimmung eines linearen Pfades, welcher
  152.    lediglich durch Anfangs- und Endpunkt festgelegt wird. Im Gegensatz zum frei
  153.    festgelegten Pfad wird hierdurch eine Animation erzeugt, die über ihren
  154.    gesamten Verlauf hinweg eine konstante Geschwindigkeit beibehält, da die
  155.    Zwischenpunkte automatisch alle im gleichen Abstand voneinander angeordnet
  156.    werden.
  157.  
  158.  - Bearbeiten: Dient zur visuellen Bearbeitung des Pfades. Durch Verschieben
  159.    der einzelnen Knotenpunkte des Pfades mit der Maus lassen sich Form und
  160.    Dichte (Geschwindigkeit) ändern. Mit Hilfe der Taste <m> kann die
  161.    Lupfenfunktion an- oder ausgeschaltet werden. Um den Bearbeitungsmodus zu
  162.    verlassen, ist die <Esc>-Taste zu drücken.
  163.  
  164.  - Position und Größe: Hiermit lassen sich unter Verwendung der Maus Position
  165.    (durch Anklicken des rechten unteren Pfadteils) und Größe (dur